package com.yoso.event;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author shizejin
 * @date 2022/6/21
 * @description:
 */
@Component
public class MyEventListener {
    //监听事件
    @EventListener
    public void listenEvent(MyEvent event) {
        //可以添加事务处理
        //divide(event);
        //对数据进行处理
        System.out.println("监听到:"+event.getUser());
    }

}
